<template>
  <div class="remarks-style"  :class="{ 'remarks-style-2': isMobile }">
    <div
      class="close-box"
      :style="{ width: isMobile ? '24px' : '', height: isMobile ? '24px' : '' }"
      :class="{ 'close-2': isMobile }"
      @click="store.setChildRemarksShow(false)"
    ></div>

    <div
      class="remarks-style-conetnt"
      :style="{
        backgroundImage: `url(${publicUrls + 'free/style10/scrollBcakground1Marsk.webp'})`,
      }"
    >
      <div class="remarks-style-left">
        <div class="title-parent">
          <div
            class="title-left"
            :style="{
              backgroundImage: `url(${
                publicUrls + 'free/style10/scrollBcakground1Marsktitle1.png?imageView2/format/webp'
              })`,
            }"
          ></div>
          <div
            class="title-center"
            :style="{
              backgroundImage: `url(${
                publicUrls + 'free/style10/scrollBcakground1Marsktitle2.png?imageView2/format/webp'
              })`,
            }"
          >
            {{ store.childTitle }}
          </div>
          <div
            class="title-right"
            :style="{
              backgroundImage: `url(${
                publicUrls + 'free/style10/scrollBcakground1Marsktitle3.png?imageView2/format/webp'
              })`,
            }"
          ></div>
        </div>
        <div class="subTitle" :class="store.isMobileType && 'subTitleWap'" v-if="store.childSubTitle">
          {{ store.childSubTitle }}
        </div>
        <scrollBox
          color="rgba(51, 51, 51, 1)"
          v-if="Scrollheights"
          :remarks="store.childRemarks"
          :byid="100"
          :isTop="true"
          :tabbmScroll="getTabmComputed"
          :height="getScrollWComputed"
        >
          <template #solidBorder>
            <div class="solidBorder-child"></div>
          </template>
        </scrollBox>
      </div>
    </div>
  </div>
</template> 

<script lang="ts">
export default defineComponent({
  name: 'styleOne',
});
</script>

<script setup lang="ts">
import { getMobileType } from '@/utils/getMoble';
import { publicUrls } from '@/utils/minxin';
import scrollBox from '../../../pages/public/copyright/scrollBox10.vue';
import { useProjectStore } from '@/store';
import { ref, computed, defineComponent } from 'vue';

const isMobile = ref(false);
isMobile.value = getMobileType();
const store = useProjectStore();
let viewportHeight = window.innerHeight;
const Scrollheights = ref();
Scrollheights.value = (viewportHeight / 900) * 560;
const getScrollWComputed = computed(() => {
  let rootNode = document.documentElement;

  // 获取计算后的样式
  let computedStyle = window.getComputedStyle(rootNode);

  // 读取字体大小（注意这里返回的可能是一个包含单位的字符串，如"16px"）
  let fontSize = computedStyle.fontSize;

  // 如果你需要一个数字值（不带单位）进行计算，你可能需要解析这个字符串
  // 例如，使用正则表达式或split()方法去除单位，并将结果转换为数字
  let fontSizeNumber = parseFloat(fontSize.replace(/[^0-9.-]/g, ''));
  let heights =isMobile.value? (fontSizeNumber / 144) * 458 : (fontSizeNumber / 144) * 508;
  return heights;
});
const getTabmComputed = computed(() => {
  let rootNode = document.documentElement;

  // 获取计算后的样式
  let computedStyle = window.getComputedStyle(rootNode);

  // 读取字体大小（注意这里返回的可能是一个包含单位的字符串，如"16px"）
  let fontSize = computedStyle.fontSize;

  // 如果你需要一个数字值（不带单位）进行计算，你可能需要解析这个字符串
  // 例如，使用正则表达式或split()方法去除单位，并将结果转换为数字
  let fontSizeNumber = parseFloat(fontSize.replace(/[^0-9.-]/g, ''));
  let heights = (fontSizeNumber / 144) * 98;
  return heights;
});
</script>   

<style scoped lang="less">
.remarks-style {
  display: flex;
  flex-direction: column;
  position: relative;
  //   width: 100%;
  //   max-width: 1200px;
  width: 1200px;
  height: 760px;
  background: transparent;

  transform: translateZ(0px);
}
.remarks-style-conetnt {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%; 
  height: 100%;
  background-repeat: no-repeat;
  background-size: 100% 100%; 
  padding: 80px 192px;
}
.remarks-style-2{
  :deep(.title-parent){ 
    margin-bottom: 20px; 
  }
  :deep(.subTitleWap){
    margin-bottom: 20px;
  }
}
.remarks-style-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  // flex: 1;
  width: 100%;
  height: 100%;
}
.title-parent {
  display: flex;
  height: 62px;
  margin-bottom: 10px;
}
.subTitle {
  color: #393836;
  text-align: center;
  font-size: 20px;
  line-height: 28px;
  margin-bottom: 12px;
}
.subTitleWap {
  font-size: 24px !important;
  line-height: 28px !important;
}
.title-left {
  width: 70px;
  height: 62px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: right;
  flex-shrink: 0;
}
.title-center {
  height: 62px;
  min-width: 178px;
  background-repeat: repeat;
  background-size: auto 100%;
  font-family: SJxingkai-C;
  font-size: 30px;
  font-weight: 400;
  line-height: 62px;
  text-align: center;
  color: #393836;
}
.title-right {
  width: 91px;
  height: 62px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  flex-shrink: 0;
}

.close-box {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 6px;
  right: 111px;
  width: 52px;
  height: 52px;
  z-index: 30;
}
// .close-2 {
//   cursor: pointer;
//   display: flex;
//   align-items: center;
//   justify-content: center;
//   position: absolute;
//   top: 48px;
//   right: 20px;
//   width: 32px;
//   height: 32px;

//   z-index: 30;

// }

::v-deep {
  .solid-box-parent {
    width: 32px;
  }
  .unit-exbi-remarks-info-remarks {
    width: calc(100% - 6px);
  }
}
:deep(.unit-exbi-remarks-info-remarks p) {
  font-family: PingFang SC;
  font-weight: 400;
  font-size: 16px !important;
  color: rgba(51, 51, 51, 1) !important;
  line-height: 32px !important;
  margin-bottom: 24px;
}
:deep(.solid-box-parent) {
  position: absolute;
  right: -17px;
  // margin-right: -32px;
}
:deep(.unit-exbit-null-remarks-info) {
  display: flex;
  align-items: center;
  height: 100%;
}
.solidBorder-child {
  width: 4px;
  height: 100%;
  background: rgba(133, 134, 139, 0.3);
  border-radius: 25px;
}
:deep(.solid-box-parent) {
  position: absolute;
  right: -32px;
}
:deep(.unit-exbi-remarks-info-remarks) {
  width: calc(100% - 1px);
}
::v-deep .templatestyle1-scroll-box-tumb {
  display: flex;
  justify-content: center;
  top: -4px;
  .scrollBar {
    width: 4px;
    // height: 100%;
    height: 98px;
    background: linear-gradient(0deg, #5b5b5b 1.93%, #7e7e7e 100%);

    border-radius: 25px;
    box-shadow: none;
  }
}
::v-deep .unit-exbi-remarks-info-remarks {
  p {
    color: rgba(57, 56, 54, 0.8);
    font-size: 17px;
    line-height: 32px;
    text-align: justify;
    font-weight: normal;
  }
}
</style>
